package cn.iocoder.yudao.module.resource.controller.admin.message.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.util.*;

import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 对话 Response VO")
@Data
@ExcelIgnoreUnannotated
public class MessageRespVO {

    @Schema(description = "唯一自增id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23536")
    @ExcelProperty("唯一自增id")
    private String messageId;

    @Schema(description = "用户id")
    @ExcelProperty("用户id")
    private Long userId;

    @Schema(description = "会话id", requiredMode = Schema.RequiredMode.REQUIRED, example = "17101")
    @ExcelProperty("会话id")
    private Long sessionId;

    @Schema(description = "对局id")
    @ExcelProperty("对局id")
    private Long gameMatchId;

    @Schema(description = "对话id", example = "17101")
    @ExcelProperty("对话id")
    private String wsSessionId;

    @Schema(description = "日志追踪id")
    @ExcelProperty("日志追踪id")
    private String traceId;

    @Schema(description = "角色id")
    @ExcelProperty("角色id")
    private Long roleId;

    @Schema(description = "消息来源", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "消息来源", converter = DictConvert.class)
    @DictFormat("MessageSenderType") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer senderType;

    @Schema(description = "消息用户消息内容", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("用户消息")
    private String userText;

    @Schema(description = "回复消息", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("回复消息")
    private String replyText;

    @Schema(description = "创建者")
    @ExcelProperty("创建者")
    private String creator;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}